Page({
    data: {
        select: [{
            src: 'http://xmyimg.yoricklee.com/select/T%E6%81%A4.png',
            title: 'T恤',
            species: ['短袖圆领','短袖翻领','短袖插肩','短袖撞边','短袖V领','短袖迷彩'],
            disabled: false,
            index: 0
        },{
            src: 'http://xmyimg.yoricklee.com/select/%E5%8D%AB%E8%A1%A3.png',
            title: '卫衣',
            species: ['圆领卫衣','拉链卫衣','带帽套头卫衣','带帽拉链卫衣'],
            disabled: false,
            index: 1
        },{
            src: 'http://xmyimg.yoricklee.com/select/%E9%A9%AC%E7%94%B2.png',
            title: '马甲',
            species: null,
            disabled: true,
            index: 2
        },{
            src: 'http://xmyimg.yoricklee.com/select/%E9%95%BF%E8%A1%AB.png',
            title: '长袖',
            species: ['长袖圆领','长袖翻领','长袖V领','长袖插肩'],
            disabled: false,
            index: 3
        },{
            src: 'http://xmyimg.yoricklee.com/select/%E6%A3%92%E7%90%83%E6%9C%8D.png',
            title: '棒球服',
            species: null,
            disabled: true,
            index: 4
        },{
            src: 'http://xmyimg.yoricklee.com/select/%E9%A3%8E%E8%A1%A3.png',
            title: '风衣',
            species: ['风衣','冲锋衣'],
            disabled: false,
            index: 5
        },{
            src: 'http://xmyimg.yoricklee.com/select/%E8%81%8C%E4%B8%9A%E8%A3%85.png',
            title: '职业装',
            species: null,
            disabled: true,
            index: 6
        }, {
            src: 'http://xmyimg.yoricklee.com/select/%E5%85%B6%E4%BB%96.png',
            title: '其他',
            species: ['帽子','其他款式'],
            disabled: false,
            index: 7
        }],
        selectValue: null
    },
    onLoad() { 
        
    },
    handleSelect(e) {
        let index = e.target.dataset.index
        let selectValue = this.data.select[index].species[e.detail.value]
        this.setData({
            selectValue: selectValue
        })
        wx.navigateTo({
            url: '/pages/list/list?value=' + selectValue,
        })
    },
    handleEntry(e) {
        let title = e.currentTarget.dataset.title
        if(title != 'T恤' && title != '卫衣' && title != '风衣' && title != '长袖' && title != '其他') {
            wx.navigateTo({
                url: '/pages/list/list?value=' + title,
            })
        }
    }
})